//let parent = $(window.parent.document);
//弹出窗口参数默认值
let features = {
    height:500,
    width:500,
    top:200,
    left:500,
    location:'no',
    menubar:'no',
    resizable:'yes',
    scrollbars:'no',
    status:'no',
    titlebar:'no',
    toolbar:'no'
}
//窗口对象
let dialogWindow = null

function show(options){
    //提取参数
    const url = options.url
    const name = options.name
    delete options.url
    delete options.name
    //合并对象
    const finalFeatures = {...features, ...options}
    //拼接参数
    let featuresStr = '';
    for(let key in finalFeatures){
        featuresStr += key + '=' + finalFeatures[key] + ','
    }
    dialogWindow = window.open(url, name, featuresStr)
}

function myclose(){
    dialogWindow.close()
}